﻿/*********************弘石项目三组************************
*  功能描述：客户信息录入业务逻辑层
*  作者：刘伟康
*  时间：2021-12-9
*  修改人：刘伟康
*  修改时间：2021-12-9
*********************弘石项目三组************************/
using Hong.IRepository.IRepository_CustomerManagement;
using Hong.Model.SysDomain.Model_CustomerManagement;
using Hong.Model.SysDomain.Model_SystemSettings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hong.Business.Business_CustomerManagement
{
    /// <summary>
    /// 客户关系录入业务逻辑层
    /// </summary>
    public class CusInfoBusiness
    {
      
        #region 构造器注入
        private readonly ICustInfoRepository _cust;
        public CusInfoBusiness(ICustInfoRepository cust)
        {
            _cust = cust;
        }
        #endregion

        #region 客户关系录入
        #region 添加基本信息
        /// <summary>
        /// 添加客户基本信息
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public int PostCustomer(Customer customer)
        {
            return _cust.PostCustomer(customer);
        }
        #endregion

        #region 甲方负责人

        /// <summary>
        /// 添加甲方负责人信息
        /// </summary>
        /// <param name="person"></param>
        /// <returns></returns>
        public int PostPerson(Person person)
        {
            var i = _cust.PostPerson(person);
            return i;
        }
        /// <summary>
        /// 甲方负责人显示
        /// </summary>
        /// <returns></returns>
        /// 
        public List<Person> GetPerson(string custid)
        {
            var list = _cust.GetPerson(custid);
            return list;
        }
        /// <summary>
        /// 甲方负责人删除
        /// </summary>
        /// <returns></returns>
        /// 
        public int DeletePerson(string id)
        {
            var i = _cust.DeletePerson(id);
            return i;
        }
        /// <summary>
        /// 甲方负责人反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Person GetPersonFT(string id)
        {
            var list = _cust.GetPersonFT(id);
            return list;

        }
        /// <summary>
        /// 甲方负责人修改
        /// </summary>
        /// 
        public int PutPerson(Person person)
        {
            var i = +_cust.PutPerson(person);
            return i;
        }
        #endregion

        #region 扩展信息
        /// <summary>
        /// 国家
        /// </summary>
        /// <returns></returns>
        public List<Address> GetAddress1()
        {
            var list = _cust.GetAddress1();
            return list;
        }
        /// <summary>
        /// 省市
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<Address> GetAddress2(string id)
        {
            var list = _cust.GetAddress2(id);
            return list;
        }

        /// <summary>
        /// 客户类型
        /// </summary>
        /// <returns></returns>

        public List<Dictionary> GetTypes()
        {
            var list = _cust.GetTypes();
            return list;
        }
        /// <summary>
        /// 所属行业
        /// </summary>
        /// <returns></returns>

        public List<Dictionary> GetIndustry()
        {
            var list = _cust.GetIndustry();
            return list;
        }
        /// <summary>
        /// 添加扩展信息
        /// </summary>
        public int PostExtended(Extended extended)
        {
            var i = _cust.PostExtended(extended);
            return i;
        }
        #endregion

        #region 满意度调查
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="satisfaction"></param>
        /// <returns></returns>
        public int PostSatisfaction(Satisfaction satisfaction)
        {
            return _cust.PostSatisfaction(satisfaction);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteSatisfaction(string id)
        {
            return _cust.DeleteSatisfaction(id);
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public List<Satisfaction> GetSatisfaction(string custid)
        {
            return _cust.GetSatisfaction(custid);
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Satisfaction GetSatisfactionFT(string id)
        {
            return _cust.GetSatisfactionFT(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="satisfaction"></param>
        /// <returns></returns>
        public int PutSatisfaction(Satisfaction satisfaction)
        {
            return _cust.PutSatisfaction(satisfaction);
        }
        #endregion

        #region 附件
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="satisfaction"></param>
        /// <returns></returns>
        public int PostAccessory(Accessory accessory)
        {
            var i = _cust.PostAccessory(accessory);
            return i;
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteAccessory(string id)
        {
            var i = _cust.DeleteAccessory(id);
            return i;
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public List<Accessory> GetAccessory(string custid)
        {
            var list = _cust.GetAccessory(custid);
            return list;
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Accessory GetAccessoryFT(string id)
        {
            var list = _cust.GetAccessoryFT(id);
            return list;
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="satisfaction"></param>
        /// <returns></returns>
        public int PutAccessory(Accessory accessory)
        {
            var i = _cust.PutAccessory(accessory);
            return i;
        }
        #endregion
        #endregion


    }
}
